#!/bin/sh 
# postinst script for openstreetmap-mapnik-data
#
# see: dh_installdeb(1)

set -e

case "$1" in
    configure)

        . /usr/share/debconf/confmodule

	db_get openstreetmap-mapnik-data/initdb || true
	INIT_DB=$RET

	db_get openstreetmap-mapnik-data/grant_user || true
	GRANT_USER=$RET

	#echo "# Default settings for openstreetmap-mapnik-data" > /etc/default/openstreetmap-mapnik-data
	#echo "GRANT_USER='$GRANT_USER' " >> /etc/default/openstreetmap-mapnik-data
	#echo "INIT_DB='$INIT_DB' " >> /etc/default/openstreetmap-mapnik-data

	/usr/bin/install-db-osm-data-mapnik || true
	true
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac


# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
